@prefixCls: textin-image;
@preview-mask-bg: fade(#000000, 100%);
@background-color: #f3f3f3;
@text-color-disabled: #c5c7cf;

:global {
  .box() {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }
  .reset() {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  .@{prefixCls} {
    &-img {
      max-width: 100%;
      max-height: 100%;
      vertical-align: middle;
      transform: scale3d(1, 1, 1);
      cursor: grab;
      transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
      user-select: none;
      pointer-events: auto;
      image-orientation: none !important;

      &:not([src]) {
        opacity: 0;
      }

      &-wrapper {
        .box;
        transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
        &::before {
          display: inline-block;
          width: 1px;
          height: 50%;
          margin-right: -1px;
          content: '';
        }
      }
      &-placeholder {
        background-color: @background-color;
        background-image: url();
        background-repeat: no-repeat;
        background-position: center center;
        background-size: 30%;
      }
    }
    &-noTransition {
      transition: none !important;
    }
    &-robot-mark {
      position: absolute;
      top: 0;
      left: 0;
      z-index: 20;
      width: auto;
      height: auto;
      text-align: left;
      transform: scale3d(1, 1, 1);
      transition: transform 0.3s cubic-bezier(0, 0, 0.25, 1) 0s;
    }
    &-notEvent {
      cursor: none;
      pointer-events: none;
    }
    &-placeholder {
      .box;
    }
    &-operations {
      .reset;
      z-index: 1;
      display: flex;
      flex-direction: row-reverse;
      align-items: center;
      justify-content: center;
      width: 100%;
      padding: 20px 0;
      color: @text-color;
      text-align: center;
      list-style: none;
      pointer-events: auto;

      &-line {
        width: 1px;
        height: 20px;
        margin-left: 16px;
        overflow: hidden;
        font-size: 20px;
        line-height: 20px;
        pointer-events: none;

        :global {
          .ant-divider-vertical {
            top: 0;
            height: 100%;
            margin: 0;
            border-color: @text-color-disabled;
          }
        }
      }

      &-operation {
        height: 20px;
        margin-left: 16px;
        line-height: 20px;
        cursor: pointer;
        &-disabled {
          // color: @text-color-disabled;
          pointer-events: none;
          svg {
            g {
              fill: @text-color-disabled;
            }
          }
        }
        &:last-of-type {
          margin-left: 0;
        }
        :active {
          color: @text-color-disabled;
        }
      }
      &-icon {
        font-size: 20px;
      }
    }
  }
}

.pdf-tips-wrapper {
  position: absolute;
  top: 2px;
  right: 20px;
  left: 20px;
  z-index: 99;
  box-shadow: 0 4px 12px 0 rgba(6, 6, 26, 0.1), 0 0 20px -15px rgba(19, 18, 60, 0.14);

  .pdf-tips {
    width: 100%;
    height: 55px;
    color: @text-color;
    background-color: #fff;
    border-color: #fff;
    border-radius: 4px;
  }
}

.pdf-viewer {
  z-index: 2;
  overflow: visible !important;
}
